package 抽象类HouseProperty及其子类;

/**
 * @author ：wang-ting
 * @Date：2025/6/22 17:49
 */
public class Office extends HouseProperty{
    protected Office(double area, double unitPrice) {
        super(area, unitPrice);
    }

    @Override
    public double taxCalculation() {
        if(this.area <= 100){
            return this.unitPrice * this.area *  0.025;
        }else if(this.area <= 250){
            return this.unitPrice * this.area *  0.035;
        }else{
           return this.unitPrice * this.area * 0.05;
        }
    }
}
